package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.SocWebsiteExample.E_AREA_ID;
import static org.jsola.hr.example.SocWebsiteExample.E_AREA_NAME;
import static org.jsola.hr.example.SocWebsiteExample.E_DOMAIN;
import static org.jsola.hr.example.SocWebsiteExample.E_LOGIN_URL;
import static org.jsola.hr.example.SocWebsiteExample.E_SYNC_SERVICE_BEAN_NAME;
import static org.jsola.hr.example.SocWebsiteExample.E_TYPE;
import static org.jsola.hr.example.SocWebsiteExample.E_URL;
import static org.jsola.hr.example.SocWebsiteExample.M_AREA_ID_NOT_NULL;
import static org.jsola.hr.example.SocWebsiteExample.M_AREA_NAME_MAX;
import static org.jsola.hr.example.SocWebsiteExample.M_DOMAIN_MAX;
import static org.jsola.hr.example.SocWebsiteExample.M_LOGIN_URL_MAX;
import static org.jsola.hr.example.SocWebsiteExample.M_SYNC_SERVICE_BEAN_NAME_MAX;
import static org.jsola.hr.example.SocWebsiteExample.M_TYPE_MAX;
import static org.jsola.hr.example.SocWebsiteExample.M_TYPE_NOT_NULL;
import static org.jsola.hr.example.SocWebsiteExample.M_URL_MAX;
import static org.jsola.hr.example.SocWebsiteExample.N_AREA_ID;
import static org.jsola.hr.example.SocWebsiteExample.N_AREA_NAME;
import static org.jsola.hr.example.SocWebsiteExample.N_DOMAIN;
import static org.jsola.hr.example.SocWebsiteExample.N_LOGIN_URL;
import static org.jsola.hr.example.SocWebsiteExample.N_SYNC_SERVICE_BEAN_NAME;
import static org.jsola.hr.example.SocWebsiteExample.N_TYPE;
import static org.jsola.hr.example.SocWebsiteExample.N_URL;

/**
 * 社保网站与类型
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【社保网站与类型】的参数")
@Data
public class SocWebsiteUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_DOMAIN, example = E_DOMAIN)
    @Length(max = 500, message = M_DOMAIN_MAX)
    private String domain;

    @ApiModelProperty(notes = N_AREA_NAME, example = E_AREA_NAME)
    @Length(max = 50, message = M_AREA_NAME_MAX)
    private String areaName;

    @ApiModelProperty(notes = N_SYNC_SERVICE_BEAN_NAME, example = E_SYNC_SERVICE_BEAN_NAME)
    @Length(max = 50, message = M_SYNC_SERVICE_BEAN_NAME_MAX)
    private String syncServiceBeanName;

    @ApiModelProperty(notes = N_LOGIN_URL, example = E_LOGIN_URL)
    @Length(max = 500, message = M_LOGIN_URL_MAX)
    private String loginUrl;

    @ApiModelProperty(notes = N_AREA_ID, example = E_AREA_ID, required = true)
    @NotNull(message = M_AREA_ID_NOT_NULL)
    private Long areaId;

    @ApiModelProperty(notes = N_TYPE, example = E_TYPE, required = true)
    @NotNull(message = M_TYPE_NOT_NULL)
    @Length(max = 11, message = M_TYPE_MAX)
    private String type;

    @ApiModelProperty(notes = N_URL, example = E_URL)
    @Length(max = 500, message = M_URL_MAX)
    private String url;


}

